load mnist_all

label0 = -ones(size(test0,1),1);
label1 = ones(size(test1,1),1);
label = [label0;label1];
data = [test0;test1];

idx = randperm(size(label,1));
data = data(idx,:);
label = int8(label(idx,:));

save('mnist0v1','data','label');